package com.hzsxy.bighomework.repository;


import com.hzsxy.bighomework.entity.ClassInfoDO;
import org.jboss.jandex.ClassInfo;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by 张晨 on 2018/11/28.
 */
@Repository
public interface ClassInfoRepository extends CrudRepository<ClassInfoDO,String> {
    @Query("select class_info from ClassInfoDO class_info where class_info.teacherIdFK.teacher_id=?1")
    Iterable<ClassInfoDO> findAllByTeacher_id(String teacher);

    List<ClassInfoDO> findAll();

    List<ClassInfoDO> findByClassId(String classId);
}
